#coding:utf-8

from flask import Flask, request, make_response,render_template
import requests as r


app = Flask(__name__)


def add_daylist():
    msg = u"添加成功！"
    
    return render_template('Home.html',msg=msg)

@app.route('/',methods=['POST',"GET"])
def index():
    if request.method == "POST":
        req = request.get_json()
        print(req)
        response = make_response('<h1>测试post</h1>')
        return response
    else:
        #return "good"
        return render_template('Home.html', msg=None)

@app.route('/add_day')
def add_day():
    return add_daylist()




if __name__ == "__main__":
    app.run(host='0.0.0.0',port=5000, debug=True)

  